package com.cn.lf.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by liufeng on 2018/6/13
 */
@RestController
public class MemberController {

    @Value("${server.port}")
    private String port;

    @GetMapping("/getMemberAll")
    public List<String> getMemberAll(){
          //休眠3秒，测试专用
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            //e.printStackTrace();
        }
        List<String> list = new ArrayList<>();
       list.add("shaoyang");
       list.add("changsha");
       list.add(port);
       return list;
    }

    @GetMapping("/getMemberZuul")
    public String getMemberZuul(){
        return "member getMemberZuul ==";
    }

}
